import { IWorks } from '@/interface';
import { $get, $post, $put, $delete } from '@/request/api';

export function fetchWorksList(params) {
  return $get('/works/list',params);
}

export function fetchCreateWorks(data: IWorks) {
  return $post('/works/create',data);
}

export function fetchUpdateWorks(data: IWorks) {
  return $put(`/works/update/${data.id}`, data);
}

export function fetchDeleteWorks(id: number) {
  return $delete(`/works/delete/${id}`);
}
